class PagesController < ApplicationController
  #caches_action :show
  
  # GET /pages/:id
  # GET /pages/:id.xml
  def show
    @structure = Structure.find_by_slug(params[:id])
    raise ActiveRecord::RecordNotFound if @structure.nil?
    
    @page = @structure.page || Page.new
    @coaches = Structure.by_kind(:coaches).find(:first).posts.visible if @structure.slug == 'team'
    
    respond_to do |format|
      format.html {} # show.html
      format.xml { render :xml=>@page }
    end
  end
end
